import React from "react";
import { Form, Col, Row } from "antd";
import { LeftOutlined,AlignLeftOutlined} from "@ant-design/icons";

const orderState={PLACED:"制作：",PREPARING:"制作：",MEAL:"出餐：",BILLED:"查看：",PREPARED:"结账: "};


  const getFields = (props,boolValue) => {
    let state=props;
    if(boolValue){
        state.status="MEAL";
    }
     
    return (
      <React.Fragment>
        <Col span={24}>
          <div   className="headAddShop">
            <Row>
            <Col span={8}>
              <LeftOutlined  style={{fontSize:30,paddingLeft:10,paddingTop:10,paddingBottom:10 }}/>
              </Col>
              <Col span={8} style={{paddingLeft:100,paddingTop:10,paddingBottom:10}}>
                <span style={{center:30,fontSize:20}}>
                    {orderState[props.status]}{props.id}</span>
              </Col>

              <Col span={8} style={{paddingTop:10,paddingBottom:10,paddingRight:10,paddingLeft:160}}>
                
                <AlignLeftOutlined/>
              </Col>
            </Row>
          </div>
        </Col>

            {/** 基本信息 */}
          <Col span={24} >
            <div className="headlineClass">
            基本信息
            </div>
          </Col>
         
      <Col span={24}>
        <Row>
          <Col span={12}>
          <Form.Item 
          >
          <Row className="divfix">
          <Col span={8}  className="leftCommDiv">
            门店
          </Col>
             <Col span={16} style={{paddingLeft:20,paddingTop:5}}>
                 <span>{state.shopSnapshotOnPlace.name}</span>
            </Col>
    
          </Row>
          </Form.Item>
          </Col>
          <Col span={12}>
          <Form.Item 
          name="tableNo"
          >
          <Row className="divfix">
          <Col span={8}  className="leftCommDiv">
            座位号
          </Col>
          <Col span={16} style={{paddingLeft:20,paddingTop:5}}>
            <span>{state.tableNo}</span>
            </Col>
          </Row>
          </Form.Item>
          </Col>
        </Row>

      </Col>

      <Col span={24}>
        <Row>
          <Col span={12}>
          
          <Row className="divfix">
          <Col span={8}  className="leftCommDiv">
            用餐人数
          </Col>
          <Col span={16}>
          <Form.Item 
          style={{paddingLeft:20}}
          name="customerCount">
          <span>{state.customerCount}</span>
            </Form.Item>
            </Col>
          </Row>
         
          </Col>
          <Col span={12}>
         
          <Row className="divfix">
          <Col span={8}  className="leftCommDiv">
            备注
          </Col>
          <Col span={16}>
          <Form.Item 
          name="comment"
          style={{paddingLeft:20}}
          >
           <span>{state.comment}</span>
            </Form.Item>
            </Col>
          </Row>
  
          </Col>
        </Row>
      </Col>
      
      </React.Fragment>
    );
  };
  export default getFields;